<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>佣金提现</title>

<meta name="viewport" id="mobileViewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta name="description" content="！">
<meta name="Keywords" content="">

<link rel="stylesheet" href="${contextPath}/staticwx/hx/css/reset.css">
<link rel="stylesheet" href="${contextPath}/staticwx/hx/css/global.css">
<link rel="stylesheet" href="${contextPath}/staticwx/hx/css/iconfont.css">
<link rel="stylesheet" href="${contextPath}/staticwx/hx/css/uc.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
<style>
    .baseForm li label{width:100px;margin-left: -100px;}
</style>
</head>
<body>
	<div class="wrapper">
        <header class="header">
            <div class="hl"><a href="javascript:history.back();"><span class="iconfont icon-fanhui"></span></a></div>
            <div class="hc">佣金提现</div>
            <div class="hr"><span class="iconfont icon-zhuye"></span></div>
        </header>
        <div class="space"></div>
        <ul class="txList1">
            <li>
                <span>提现金额</span>
                <span class="f16 cred"><e id="rebate">${amount!0}</e>元</span>
            </li>
        </ul>
	    <div class="space"></div>
	    <form id="baseForm" class="baseForm">
			<ul>
                <li class="clearfix">
                    <label>支付宝账号：</label>
                    <div class="inputArea">
                        <input type="text" placeholder="请输入支付宝账号" name="aliaccount" id="aliaccount">
                    </div>
                </li>
				<li class="clearfix">
					<label>收款人姓名：</label>
					<div class="inputArea">
						<input type="text" placeholder="请输入收款人姓名" name="realname" id="realname">
					</div>
				</li>
			</ul>

	    </form>
	    <div class="btnPub2">
			<button class="btn" id="baseFormSubmit" onclick="sub()">提交</button>
	    </div>
	</div>
<script src="${contextPath}/staticwx/hx/js/jquery-3.0.0.min.js" type="text/javascript"></script>
    <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
<script>
    function sub(){
        var aliaccount = $("#aliaccount").val();
        if(!aliaccount){
            $.alert("请输入支付宝账号");
            return false;
        }
        var realname = $("#realname").val();
        if(!realname){
            $.alert("请输入收款人姓名");
            return false;
        }
        var amount = $("#rebate").text();
        $.ajax({
            url:"${contextPath}/wx/cash/cashApplyRebate.htm",
            data:{amount:amount,realname:realname,aliaccount:aliaccount,paytype:1},
            type:"post",
            success:function(data){
                var json = $.parseJSON(data);
                $.alert(json.errMessage,function(){
                    location.href="${contextPath}/wx/member/myRebate.htm";
                });
            }
        });
    }
</script>
</body>
</html>